/**
 * @description 订单模块的一些接口api
 * @author yinzhi
 * @date 2025-07-04
 */

import { http } from '@/uni_modules/uview-plus'
// 获取订单统计
export const getOrderCountApi = () => http.post('/app/user/order/count')
// 下单
export const getCreateOrderApi = data => http.post('/app/user/order/create', data)
// 下单支付
export const getPayOrderApi = data => http.post('/app/user/pay/order', data)
// 发票列表
export const getInvoiceListApi = data => http.post('/app/user/invoice/get/pageList', data)
// 发票详情
export const getInvoiceDetailApi = data => http.post('/app/user/invoice/get/detail', data)
// 发票申请
export const applyInvoiceApi = data => http.post('/app/user/invoice/apply', data)
// 发票申请编辑
export const updateInvoiceApi = data => http.post('/app/user/invoice/update', data)
// 发票申请编辑
export const cancelInvoiceApi = data => http.post('/app/user/invoice/cancel/apply', data)
// 订单列表
export const getOrderApi = data => http.post('/app/user/order/pageList', data)
// 订单取消(未付款订单)
export const cancelUnPayApi = data => http.post('/app/user/order/unPay/cancel', data)
// 订单取消(已付款订单)
export const cancelPayApi = data => http.post('/app/user/order/payOrder/cancel', data)
// 订单修改 名字和电话
export const updateOrderApi = data => http.post('/app/user/order/update', data)
// 提前退租 修改退房日期
export const updateCheckoutApi = data => http.post('/app/user/order/early/checkout', data)
// 订单详情
export const getOrderDetailApi = data => http.post('/app/user/order/detail', data)
